#ifndef CHTTPREQBLOB_H_INCLUDED
#define CHTTPREQBLOB_H_INCLUDED

#include "GlobalConfig.h"
#include "CHttpReq.h"

class wxMemoryBuffer;

class CHttpReqBLOB : public CHttpReq
{
    private :
        // For max performance , I need to manually delete previous MemBuf
        // Sometimes I return an entire MemBuf  to represent a BLOB,
        // the reuse of the same MemBuf will contain invaild data when the length of previous BLOB is larger
        // Frequently mem allocation is a problem , but reuse of map<MemBuf, length> is not gonna work
        // Some params are just MemBuf. There's no chance to tell the actual valid length.
        wxMemoryBuffer* blobMemBuf;

        CHttpReqBLOB (const CHttpReqBLOB&);

    public :
        CHttpReqBLOB(const bool auth_IN=true ,
                            const int retrySec_IN=HTTP_RETRY_WAIT_SEC,
                            const int timeOutSec_IN=HTTP_TIME_OUT_SEC);
        virtual ~CHttpReqBLOB();

        bool startReqBLOB(const wxString& urlStr_IN);
        wxMemoryBuffer* getMemBuf();
};

#endif // CHTTPREQBLOB_H_INCLUDED
